Skip to content

Conversation

wangmengyan95
Copy link
Contributor

No description provided.

@grantland
Copy link
Contributor

What use cases does this fix? It seems like if we're not able to write to the file, we wouldn't be able to delete it either.

@wangmengyan95
Copy link
Contributor Author

If the cacheFile exists, when we call ParseFileUtils.moveFile(tempFile, cacheFile), an IOException will be thrown. We delete it manually to make sure it does not exist before we move tempFile.

@grantland
Copy link
Contributor

Ah I see. LGTM!

wangmengyan95 added a commit that referenced this pull request Sep 10, 2015
…FileController_delete_cache_file_before_move_temp_file

Manually delete cacheFile before we write to it
@wangmengyan95 wangmengyan95 merged commit 29a3795 into master Sep 10, 2015
@wangmengyan95 wangmengyan95 deleted the wangmengyan.t8184922_ParseFileController_delete_cache_file_before_move_temp_file branch September 10, 2015 22:56
@facebook-github-bot
Copy link

@wangmengyan95 updated the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants